#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#__email__ = "wjx010107@163.com"
#__author__ = "weijinxing"


from django.db import models
from django.contrib.auth.models import User
class Mgroup(models.Model):
    mg_name = models.CharField(max_length=30)
    comment = models.CharField(max_length=50)
    minion  = models.CharField(max_length=50)


class Minions(models.Model):
    minion_id = models.CharField(max_length=50)
    os_type = models.CharField(max_length=50)
    productname = models.CharField(max_length=50)
    ipaddr = models.CharField(max_length=50)
    hostname = models.CharField(max_length=50)
    mgroup = models.ManyToManyField(Mgroup)
    cs_stat = models.CharField(max_length=50)


class Calendar(models.Model):
    title = models.CharField(max_length=150)
    start = models.CharField(max_length=50)
    end = models.CharField(max_length=50)
    allDay = models.BooleanField(default=True)
    user=models.ForeignKey(User)


class Minionstats(models.Model):
    keyname = models.CharField(max_length=50)
    keynum = models.PositiveSmallIntegerField()


class Functions(models.Model):
    funname = models.CharField(max_length=150)
    argname = models.CharField(max_length=150)
    comment = models.CharField(max_length=150)
